package com.heima.article.controller;

import com.heima.article.service.ApArticleService;
import com.heima.model.media.dtos.WmNewsResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class ApArticleController {
    @Autowired
    private ApArticleService service;

    @PostMapping("api/v1/article/save")
    public Long save(@RequestBody WmNewsResultDTO dto) {
        return service.saveArticle(dto);
    }

}
